package cc.jq1024.infrastructure.persistent.dao;

import cc.jq1024.infrastructure.persistent.po.RaffleActivityAccountMonthPO;
import cc.jq1024.router.annotation.DBRouter;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import org.apache.ibatis.annotations.Mapper;

/**
 * <p>
 * 抽奖活动账户表-月次数 Mapper 接口
 * </p>
 *
 * @author lijiaqiang@ljq1024.cc
 * @since 2024-04-28
 */
@Mapper
public interface IRaffleActivityAccountMonthDao extends BaseMapper<RaffleActivityAccountMonthPO> {

    /** 查询月额度信息 */
    @DBRouter
    RaffleActivityAccountMonthPO queryActivityAccountMonthByUserId(RaffleActivityAccountMonthPO raffleActivityAccountMonthReq);

    /** 更新月额度 */
    int updateActivityAccountMonthSubtractionQuota(RaffleActivityAccountMonthPO raffleActivityAccountMonth);

    /** 插入一条月额度记录 */
    void insertActivityAccountMonth(RaffleActivityAccountMonthPO raffleActivityAccountMonth);

    /** 更新账户 - 月 */
    int addAccountQuota(RaffleActivityAccountMonthPO raffleActivityAccountMonth);
}
